const dev = {
    /** port 端口 */
    serverPort: 83,
    dbConfig: {
        host: '39.104.61.253',
        user: 'root',
        port: '3306',
        password: 'ankuai',
        database: 'qualitcontrol',
        waitForConnections: true,
        connectionLimit: 10,
        queueLimit: 0,
    },
    // dbConfig: {
    //     host: 'ynkcdb.rwlb.rds.aliyuncs.com',
    //     user: 'soft',
    //     port: '3306',
    //     password: 'Ynkc@2025',
    //     database: 'kc_shop',
    //     waitForConnections: true,
    //     connectionLimit: 10,
    //     queueLimit: 0,
    // },
    whiteList: ['/api/oper/login', '/isp/api/appidGetToken', '/isp/api/getToken', '/images', '/chinaums/notice/qrcode', '/isp/notice/movie', '/api/getPlcList',
        '/api/getregister', '/api/realData/report', '/oauth/GetWeChatBase'],
    applet_param: {
        APPID: 'wxfe022c8e47de5e1f',
        APPSECRET: '57c925540a1de6d89b8710c4d72a1817'
        //APPID: 'wxd1290d5442819e5b',
        //APPSECRET: 'b00ba4df4651fe131415ed3bbb8f8f0d'

    },
    baseUrl: 'http://39.104.15.44:80',
    mqttConfig: {
        host: '47.108.218.17',
        port: 1883,
        username: 'admin',
        password: '!QAZ2wsx',
    }
};

const production = {
    /** port 端口 */
    serverPort: 81,
    dbConfig: {
        host: 'pc-bp1gqnrnfgk3xc2v0.rwlb.rds.aliyuncs.com',
        user: 'soft',
        port: '3306',
        password: 'Ynkc@2025',
        database: 'kc_shop',
        waitForConnections: true,
        connectionLimit: 10,
        queueLimit: 0,
    },
    whiteList: ['/api/oper/login', '/isp/api/appidGetToken', '/isp/api/getToken', '/images', '/chinaums/notice/qrcode', '/isp/notice/movie', '/isp/notice/gift_card',
        '/isp/notice/food', '/isp/notice/groupbuy', '/oauth/GetWeChatBase'],
    applet_param: {
        APPID: 'wxfe022c8e47de5e1f',
        APPSECRET: '57c925540a1de6d89b8710c4d72a1817'
        //APPID: 'wxd1290d5442819e5b',
        //APPSECRET: 'b00ba4df4651fe131415ed3bbb8f8f0d'

    },
    baseUrl: 'https://shop.ynkczx.cn',
};



let config = {

};

(() => {
    console.log('process.env.NODE_ENV', process.env.NODE_ENV);
    config = {
        ...{ dev, production }[process.env.NODE_ENV || 'dev'],
    };
    //  console.log('config', config);
})();

export default config;
